Skip to content

fix: handle force_flush for rake task with arguments #1412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025

Conversation

TeamNautilus
Copy link
Contributor

This PR fixes an issue where force_flush was not correctly triggered when executing a Rake task with arguments. Previously, ::Rake.application.top_level_tasks stored task names including arguments (e.g., "task_name[arg]"), while the comparison in force_flush was done against name (which did not include arguments). This caused force_flush to be skipped for tasks with arguments.

Changes in this PR

  • Updated force_flush logic to strip arguments from top_level_tasks before comparison.
  • Modified tests to cover cases where a Rake task has arguments.
  • Ensured force_flush is correctly called when a task with arguments is invoked.

Copy link

linux-foundation-easycla bot commented Feb 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: arielvalentin / name: Ariel Valentin (c5a2e07)
  • ✅ login: TeamNautilus / name: Team Nautilus (6e4d750)
  • ✅ login: kaylareopelle / name: Kayla Reopelle (3df1893)

@kaylareopelle
Copy link
Contributor

👋 Hi @TeamNautilus! Thanks for opening this PR! Would you mind signing the CLA?

Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Mar 28, 2025
@kaylareopelle kaylareopelle removed the stale Marks an issue/PR stale label Mar 29, 2025
Copy link
Contributor

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

@github-actions github-actions bot added the stale Marks an issue/PR stale label Apr 28, 2025
@github-actions github-actions bot removed the stale Marks an issue/PR stale label May 13, 2025
@kaylareopelle kaylareopelle merged commit 67743b2 into open-telemetry:main May 27, 2025
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants